home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / utmisc1 / dface103.lha / DeCruncherFace / Source / DFace_V103.asc < prev    next >
Text File  |  1996-04-21  |  10KB  |  457 lines

  1. Set Buffer 8
  2. Global ER,PA1$,PA2$
  3. Dim A$(5)
  4. Dim PTYP$(8)
  5. Dim PTP$(8)
  6. For I=1 To 7 : Read PDATA$ : PTYP$(I)=PDATA$ : Next 
  7. Data "LHA","LZX","UNZIP","DMS","UNARJ","PPACK","UNRAR"
  8. CHESTA=1
  9. '----------------------------------------------------
  10. 'Tooltypes auslesen
  11. '
  12. WBY=Ex Wb Height
  13. WBX=Ex Wb Width
  14. TTYPE1$=Ex Get Tooltype("DFACE","XPOS")
  15. TTYPE2$=Ex Get Tooltype("DFACE","YPOS")
  16. TTYPE3$=Ex Get Tooltype("DFACE","ICONIFY")
  17. WINX=Val(TTYPE1$)
  18. WINY=Val(TTYPE2$)
  19. If WINX<0 Then WINX=0
  20. If WINY<0 Then WINY=0
  21. If(WINX+250)>WBX Then WINX=(WBX-250)
  22. If(WINY+120)>WBY Then WINY=(WBY-120)
  23. Ex Tooltype Done 
  24. '----------------------------------------------------
  25. 'Prefs laden 
  26. '
  27. If Exist("config")
  28.    Open In 1,"config"
  29.    Line Input #1,PA1$
  30.    Line Input #1,PA2$
  31.    Input #1,PREFPACK
  32.    Input #1,CHESTA
  33.    For I=1 To 7 : Line Input #1,PTYP$(I) : Next I
  34.    Close 1
  35. End If 
  36. '----------------------------------------------------
  37. Ex Wind Open 1,WINX,WINY,250,120,$20+$40+$200,14,0
  38. Ex Wind Title 1,"DeCruncherFace V1.03"
  39. Ex Gadgets Init 0,1,5
  40. Ex Labels Init 1,"LHA,LZH,LZX,ZIP,DMS,ARJ,PP,RUN,RAR,AUTO"
  41. Ex Labels Init 2,"LHA,LZH,LZX,ZIP,DMS,ARJ,PP,RUN,RAR,AUTO"
  42. Ex Def Cycle 1,30,30,80,15,Ex Labels(1),"Packer",4,1
  43. Ex Def Button 2,30,60,80,15,"DePack",16,1
  44. Ex Def Button 3,130,30,80,15,"Prefs",16,1
  45. Ex Def Button 4,130,60,80,15,"About",16,1
  46. Ex Def Button 5,80,90,80,15,"Quit",16,1
  47. Ex Gadgets Open 1
  48. Ex Set Cycle 1,PREFPACK,1
  49. CP=PREFPACK
  50. If TTYPE3$="YES"
  51.    Ex Wind Zip 1
  52. End If 
  53. SCHLEIFE:
  54. Ex Wind Active 1
  55. Do 
  56.    Multi Wait 
  57.    MSG=Ex Get Msg(1)
  58.    If MSG
  59.       Ex Reply Msg 
  60.       If MSG=$200
  61.          GG=Ex Get Key
  62.          Ex Wind Zip 1
  63.       End If 
  64.       If MSG=$20
  65.          GG=Ex Get Key
  66.       End If 
  67.       If MSG=$40
  68.          GG=Ex Get Key
  69.          If GG=1
  70.             CP=Ex Get Part
  71.          End If 
  72.       End If 
  73.       If GG=5
  74.          FERTIG
  75.       End If 
  76.       If GG=2
  77.          Exit 
  78.       End If 
  79.       If GG=4
  80.          Goto ABOUT
  81.       End If 
  82.       If GG=3
  83.          Goto PREFS
  84.       End If 
  85.    End If 
  86. Loop 
  87. ZEIGER:
  88. P=CP+1
  89. On P Goto LHA,LHA,LZX,ZIP,DMS,ARJ,PP,APLUS,RAR,AUTO
  90. '----------------------------------------------- 
  91. LHA:
  92. FISEL
  93. F1$=Param$
  94. If F1$="" Then Goto SCHLEIFE
  95. AUTO1:
  96. If CHESTA=1
  97.    PATH[PA2$]
  98.    F2$=Param$
  99. Else 
  100.    F2$=PA2$
  101. End If 
  102.  
  103. If F2$="" Then Goto SCHLEIFE
  104. G$=Chr$(34)+PTYP$(1)+Chr$(34)+" x "+Chr$(34)+F1$+Chr$(34)+" "+Chr$(34)+F2$+Chr$(34)+Chr$(0)
  105. CONOPEN
  106. DEPACK
  107. CONCLOSE
  108. Goto SCHLEIFE
  109. '----------------------------------------------- 
  110. LZX:
  111. FISEL
  112. F1$=Param$
  113. If F1$="" Then Goto SCHLEIFE
  114. AUTO2:
  115. If CHESTA=1
  116.    PATH[PA2$]
  117.    F2$=Param$
  118. Else 
  119.    F2$=PA2$
  120. End If 
  121. If F2$="" Then Goto SCHLEIFE
  122. G$=Chr$(34)+PTYP$(2)+Chr$(34)+" x "+Chr$(34)+F1$+Chr$(34)+" "+Chr$(34)+F2$+Chr$(34)
  123. CONOPEN
  124. DEPACK
  125. CONCLOSE
  126. Goto SCHLEIFE
  127. '----------------------------------------------- 
  128. ZIP:
  129. FISEL
  130. F1$=Param$
  131. If F1$="" Then Goto SCHLEIFE
  132. AUTO3:
  133. If CHESTA=1
  134.    PATH[PA2$]
  135.    F2$=Param$
  136. Else 
  137.    F2$=PA2$
  138. End If 
  139. If F2$="" Then Goto SCHLEIFE
  140. G$=Chr$(34)+PTYP$(3)+Chr$(34)+" "+Chr$(34)+F1$+Chr$(34)+" -x -d "+Chr$(34)+F2$+Chr$(34)
  141. CONOPEN
  142. DEPACK
  143. CONCLOSE
  144. Goto SCHLEIFE
  145. '------------------------------------------------
  146. DMS:
  147. FISEL
  148. F1$=Param$
  149. If F1$="" Then Goto SCHLEIFE
  150. AUTO4:
  151. G$=Chr$(34)+PTYP$(4)+Chr$(34)+" write "+Chr$(34)+F1$+Chr$(34)
  152. CONOPEN
  153. DEPACK
  154. CONCLOSE
  155. Goto SCHLEIFE
  156. '------------------------------------------------
  157. ARJ:
  158. FISEL
  159. F1$=Param$
  160. If F1$="" Then Goto SCHLEIFE
  161. AUTO5:
  162. If CHESTA=1
  163.    PATH[PA2$]
  164.    F2$=Param$
  165. Else 
  166.    F2$=PA2$
  167. End If 
  168. If F2$="" Then Goto SCHLEIFE
  169. A$(1)="cd "+Chr$(34)+F2$+Chr$(34)
  170. A$(2)=Chr$(34)+PTYP$(5)+Chr$(34)+" x "+Chr$(34)+F1$+Chr$(34)
  171. Open Out 1,"ram:script"
  172. For I=1 To 2
  173.    Print #1,A$(I); : Print #1,Chr$(10);
  174. Next I
  175. Close 1
  176. CONOPEN
  177. A$="execute "+Chr$(34)+"ram:script"+Chr$(34)+Chr$(0)
  178. Dreg(1)=Varptr(A$)
  179. Dreg(2)=0
  180. Dreg(3)=ER
  181. EXE=Doscall(-222)
  182. A$="echo Please Press Left Mousebutton"+Chr$(0)
  183. Dreg(1)=Varptr(A$)
  184. Dreg(2)=0
  185. Dreg(3)=ER
  186. EXE=Doscall(-222)
  187. Ex Mouse Wait 
  188. CONCLOSE
  189. Kill "ram:script"
  190. Goto SCHLEIFE
  191. '--------------------------------------------------
  192. PP:
  193. FISEL
  194. F1$=Param$
  195. If F1$="" Then Goto SCHLEIFE
  196. If CHESTA=1
  197.    PATH[PA2$]
  198.    F2$=Param$
  199. Else 
  200.    F2$=PA2$
  201. End If 
  202. If F2$="" Then Goto SCHLEIFE
  203. G$=Chr$(34)+PTYP$(6)+Chr$(34)+"  nodel "+Chr$(34)+F1$+Chr$(34)+" to "+Chr$(34)+F2$+Chr$(34)
  204. CONOPEN
  205. DEPACK
  206. CONCLOSE
  207. Goto SCHLEIFE
  208. '----------------------------------------------------
  209. APLUS:
  210. FISEL
  211. F1$=Param$
  212. If F1$="" Then Goto SCHLEIFE
  213. AUTO6:
  214. If CHESTA=1
  215.    PATH[PA2$]
  216.    F2$=Param$
  217. Else 
  218.    F2$=PA2$
  219. End If 
  220. If F2$="" Then Goto SCHLEIFE
  221. G$=Chr$(34)+F1$+Chr$(34)+" "+Chr$(34)+F2$+Chr$(34)
  222. CONOPEN
  223. DEPACK
  224. CONCLOSE
  225. Goto SCHLEIFE
  226. '----------------------------------------------------- 
  227. RAR:
  228. FISEL
  229. F1$=Param$
  230. If F1$="" Then Goto SCHLEIFE
  231. AUTO7:
  232. If CHESTA=1
  233.    PATH[PA2$]
  234.    F2$=Param$
  235. Else 
  236.    F2$=PA2$
  237. End If 
  238. If F2$="" Then Goto SCHLEIFE
  239. A$(1)="cd "+Chr$(34)+F2$+Chr$(34)
  240. A$(2)=Chr$(34)+PTYP$(7)+Chr$(34)+" x "+Chr$(34)+F1$+Chr$(34)
  241. Open Out 1,"ram:script"
  242. For I=1 To 2
  243.    Print #1,A$(I); : Print #1,Chr$(10);
  244. Next I
  245. Close 1
  246. CONOPEN
  247. A$="execute "+Chr$(34)+"ram:script"+Chr$(34)+Chr$(0)
  248. Dreg(1)=Varptr(A$)
  249. Dreg(2)=0
  250. Dreg(3)=ER
  251. EXE=Doscall(-222)
  252. A$="echo Please Press Left Mousebutton"+Chr$(0)
  253. Dreg(1)=Varptr(A$)
  254. Dreg(2)=0
  255. Dreg(3)=ER
  256. EXE=Doscall(-222)
  257. Ex Mouse Wait 
  258. CONCLOSE
  259. Kill "ram:script"
  260. Goto SCHLEIFE
  261. '----------------------------------------------------- 
  262. AUTO:
  263. FISEL
  264. F1$=Param$
  265. If F1$="" Then Goto SCHLEIFE
  266. CHECK$=Lower$(Right$((F1$),4))
  267. If CHECK$=".lha" Then Goto AUTO1
  268. If CHECK$=".lzh" Then Goto AUTO1
  269. If CHECK$=".lzx" Then Goto AUTO2
  270. If CHECK$=".zip" Then Goto AUTO3
  271. If CHECK$=".dms" Then Goto AUTO4
  272. If CHECK$=".arj" Then Goto AUTO5
  273. If CHECK$=".run" Then Goto AUTO6
  274. If CHECK$=".rar" Then Goto AUTO7
  275. Goto SCHLEIFE
  276. '----------------------------------------------------- 
  277. ABOUT:
  278. REQ$=""
  279. REQ$=REQ$+"  DFace is Freeware, but don't "+Chr$(10)
  280. REQ$=REQ$+"    spread it manipulated !    "+Chr$(10)+Chr$(10)
  281. REQ$=REQ$+"   This Program was designed   "+Chr$(10)
  282. REQ$=REQ$+"  with Amos_Pro V2.0 and AMIPS "+Chr$(10)+Chr$(10)
  283. REQ$=REQ$+"Written in 4/96 by Andreas Wenk"+Chr$(10)
  284. REQ$=REQ$+"E-Mail: sks@wizard.art-line.de "+Chr$(10)
  285. REQ$=REQ$+"   or sks@legobbs.art-line.de  "
  286. RQ=Ex Request(2,"About DFace...",REQ$,"Shut up")
  287. Goto SCHLEIFE
  288. '----------------------------------------------------
  289. PREFS:
  290. Ex Wind Open 2,100,30,250,150,$40+$200,14,0
  291. Ex Wind Title 2,"Prefs Window"
  292. Ex Gadgets Init 0,2,8
  293. Ex Def Button 1,10,30,105,15,"Archive-Path",16,2
  294. Ex Def Button 2,125,30,100,15,"Output-Path",16,2
  295. Ex Def Button 3,30,120,50,15,"Save",16,2
  296. Ex Def Button 4,90,120,50,15,"Use",16,2
  297. Ex Def Button 5,150,120,50,15,"Abort",16,2
  298. Ex Def Cycle 6,30,70,70,15,Ex Labels(2),"Packer",4,2
  299. Ex Def Button 7,125,70,100,15,"Packer-Path",16,2
  300. Ex Def Checkbox 8,170,100,0,0,"Destination Request",0,2
  301. Ex Gadgets Open 2
  302. Ex Set Checkbox 8,CHESTA,2
  303. Ex Set Cycle 6,CP,2
  304. PU1$=PA1$ : PU2$=PA2$
  305. For I=1 To 7 : PTP$(I)=PTYP$(I) : Next I
  306. PCHESTA=CHESTA
  307. SCHLEIFE2:
  308. Ex Wind Active 2
  309. Do 
  310.    Multi Wait 
  311.    MSG=Ex Get Msg(2)
  312.    If MSG
  313.       Ex Reply Msg 
  314.       If MSG=$200
  315.          PA1$=PU1$ : PA2$=PU2$
  316.          Goto PREFSEND
  317.       End If 
  318.       If MSG=$40
  319.          GH=Ex Get Key
  320.       End If 
  321.       If GH=5
  322.          PA1$=PU1$ : PA2$=PU2$
  323.          For I=1 To 7 : PTYP$(I)=PTP$(I) : Next I
  324.          CHESTA=PCHESTA
  325.          Goto PREFSEND
  326.       End If 
  327.       If GH=1
  328.          PATH[PA1$]
  329.          PA1$=Param$
  330.          If PA1$=""
  331.             PA1$=PU1$
  332.          End If 
  333.       End If 
  334.       If GH=2
  335.          PATH[PA2$]
  336.          PA2$=Param$
  337.          If PA2$=""
  338.             PA2$=PU2$
  339.          End If 
  340.       End If 
  341.       If GH=3
  342.          Open Out 1,"Config"
  343.          Print #1,PA1$
  344.          Print #1,PA2$
  345.          Print #1,PB
  346.          Print #1,Ex Get Checkbox(8,2)
  347.          For I=1 To 7 : Print #1,PTYP$(I) : Next I
  348.          Close 1
  349.          Ex Set Cycle 1,CP,1
  350.          Goto PREFSEND
  351.       End If 
  352.       If GH=4
  353.          Ex Set Cycle 1,CP,1
  354.          CHESTA=Ex Get Checkbox(8,2)
  355.          Goto PREFSEND
  356.       End If 
  357.       If GH=6
  358.          PB=Ex Get Part : CP=PB
  359.       End If 
  360.       If GH=7
  361.          If CP=0
  362.             PTYP$(1)=Ex Filesel$(0,0,"LHA anwählen","","","")
  363.             If PTYP$(1)=""
  364.                PTYP$(1)=PTP$(1)
  365.             End If 
  366.          End If 
  367.          If CP=2
  368.             PTYP$(2)=Ex Filesel$(0,0,"LZX anwählen","","","")
  369.             If PTYP$(2)=""
  370.                PTYP$(2)=PTP$(2)
  371.             End If 
  372.          End If 
  373.          If CP=3
  374.             PTYP$(3)=Ex Filesel$(0,0,"UNZIP anwählen","","","")
  375.             If PTYP$(3)=""
  376.                PTYP$(3)=PTP$(3)
  377.             End If 
  378.          End If 
  379.          If CP=4
  380.             PTYP$(4)=Ex Filesel$(0,0,"DMS anwählen","","","")
  381.             If PTYP$(4)=""
  382.                PTYP$(4)=PTP$(4)
  383.             End If 
  384.          End If 
  385.          If CP=5
  386.             PTYP$(5)=Ex Filesel$(0,0,"UNARJ anwählen","","","")
  387.             If PTYP$(5)=""
  388.                PTYP$(5)=PTP$(5)
  389.             End If 
  390.          End If 
  391.          If CP=6
  392.             PTYP$(6)=Ex Filesel$(0,0,"PPACK anwählen","","","")
  393.             If PTYP$(6)=""
  394.                PTYP$(6)=PTP$(6)
  395.             End If 
  396.          End If 
  397.          If CP=8
  398.             PTYP$(7)=Ex Filesel$(0,0,"UNRAR anwählen","","","")
  399.             If PTYP$(7)=""
  400.                PTYP$(7)=PTP$(7)
  401.             End If 
  402.          End If 
  403.       End If 
  404.    End If 
  405. Loop 
  406. PREFSEND:
  407. Ex Wind Close 2
  408. Ex Gadgets Close 2
  409. Goto SCHLEIFE
  410. '----------------------------------------------------- 
  411. Procedure FERTIG
  412.    Ex Wind Close 1
  413.    Ex Gadgets Close 1
  414.    End 
  415. End Proc
  416. Procedure FISEL
  417.    Shared CP
  418.    SUF$=""
  419.    If CP=0 Then SUF$="#?.lha"
  420.    If CP=1 Then SUF$="#?.lzh"
  421.    If CP=2 Then SUF$="#?.lzx"
  422.    If CP=3 Then SUF$="#?.zip"
  423.    If CP=4 Then SUF$="#?.dms"
  424.    If CP=5 Then SUF$="#?.arj"
  425.    If CP=7 Then SUF$="#?.run"
  426.    If CP=8 Then SUF$="#?.rar"
  427.    FILE$=Ex Filesel$(0,0,"Archiv wählen",PA1$,"",SUF$)
  428. End Proc[FILE$]
  429. Procedure PATH[DF$]
  430.    PATH$=Ex Devsel$(1,"Zielschublade wählen",DF$)
  431. End Proc[PATH$]
  432. Procedure CONOPEN
  433.    CONSOLE$="CON:0/0/640/200/Packer-Ausgabe-Fenster"+Chr$(0)
  434.    Dreg(1)=Varptr(CONSOLE$)
  435.    Dreg(2)=1006
  436.    ER=Doscall(-30)
  437. End Proc
  438. Procedure CONCLOSE
  439.    Shared ER
  440.    Dreg(1)=ER
  441.    EXE=Doscall(-36)
  442. End Proc
  443. Procedure DEPACK
  444.    Shared G$,ER
  445.    Dreg(1)=Varptr(G$)
  446.    Dreg(2)=0
  447.    Dreg(3)=ER
  448.    EXE=Doscall(-222)
  449.    MG$="echo please press mousebutton"+Chr$(0)
  450.    Dreg(1)=Varptr(MG$)
  451.    Dreg(2)=0
  452.    Dreg(3)=ER
  453.    EXE=Doscall(-222)
  454.    Ex Mouse Wait 
  455. End Proc
  456.  
  457.